package com.ruoyi.sample.service;


import com.ruoyi.experiment.domain.Circulation;
import com.ruoyi.experiment.domain.Project;
import com.ruoyi.experiment.domain.Sample;
import com.ruoyi.experiment.model.TreeSample;
import com.ruoyi.sample.model.SItem;
import com.ruoyi.sample.model.SampleLz;

import java.util.List;

/**
 * 样品Service接口
 *
 * @author ruoyi
 * @date 2024-06-11
 */
public interface ISampleService
{
    /**
     * 查询样品
     *
     * @param sampleId 样品主键
     * @return 样品
     */
    public Sample selectSampleBySampleId(Long sampleId);

    /**
     * 查询样品列表
     *
     * @param sample 样品
     * @return 样品集合
     */
    public List<Sample> selectSampleList(Sample sample);
    public List<TreeSample> selectTreeSampleList(Sample sample);
    public List<Sample> selectAllSampleBySid(List<Long> ids);
    /**
     * 新增样品
     *
     * @param sample 样品
     * @return 结果
     */
    public int insertSample(Sample sample);

    /**
     * 修改样品
     *
     * @param sample 样品
     * @return 结果
     */
    public int updateSample(Sample sample);

    /**
     * 批量删除样品
     *
     * @param sampleIds 需要删除的样品主键集合
     * @return 结果
     */
    public int deleteSampleBySampleIds(Long[] sampleIds);

    /**
     * 删除样品信息
     *
     * @param sampleId 样品主键
     * @return 结果
     */
    public int deleteSampleBySampleId(Long sampleId);

    List<SItem> selectAllItem(Project project);

    void flume(Circulation circulation);
    boolean flumeBack(List<Long> ids,String person);
    List<Integer> selectSampleStatusBySampleIds(Long[] sampleIds);

    List<SampleLz> listLz(SampleLz sampleLz);

    boolean checkSampleName(Long projectId,String name);
    List<Sample> transformTreeToList(List<TreeSample> tree);

    /**
     * 确认流转
     * @param status
     * @param id
     * @return
     */
    boolean confirmLZ(Integer status,Long id);
    /**
     * 批量添加
     */
    int addSamples(List<Sample> samples);
}

